package com.tech.http;

import com.tech.utils.CollectionsHelper;

import java.util.Collections;
import java.util.Map;

public class Request {
	private Map<String, Object> params = CollectionsHelper.newHashMap();

	private Request() {
	}

	public static Request createRequest() {
		return new Request();
	}

	public void setParam(String name, Object value) {
		this.params.put(name, value);
	}

	public void setParams(Map<String, ?> params) {
		this.params.putAll(params);
	}

	public Map<String, Object> getParams() {
		return Collections.unmodifiableMap(this.params);
	}

	@Override
	public String toString() {
		return "Request @[params=" + params + "]";
	}
}
